package course.d1225;

import java.io.Serializable;
import java.util.Objects;

public class Student implements Serializable {
    private static final long serialVersionUID = 3850725704122467803L;
    private String StuID;
    private String name;

    public Student(String stuID, String name) {
        StuID = stuID;
        this.name = name;
    }

    public Student() {
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getStuID() {
        return StuID;
    }

    public void setStuID(String stuID) {
        StuID = stuID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(StuID, student.StuID) &&
                Objects.equals(name, student.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(StuID, name);
    }

    @Override
    public String toString() {
        return "Student{" +
                "StuID='" + StuID + '\'' +
                ", name='" + name + '\'' +
                '}';
    }

}
